package com.battery.system.domain;

import com.battery.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;

/**
 * 设备申领对象 ws_dev_apply
 *
 * @author battery
 * @date 2021-01-22
 */
@Table(name = "ws_dev_apply")
public class DevApply {


    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @Id
    @KeySql(useGeneratedKeys = true)
    private String id;

    /**
     * 直营合作商ID
     */
    @Excel(name = "直营合作商ID")
    private String partnerId;

    /**
     * 地址ID
     */
    @Excel(name = "地址ID")
    private String addressId;

    /**
     * 上级合作商ID
     */
    @Excel(name = "上级合作商ID")
    private String superiorId;

    /**
     * 平台-项目ID
     */
    @Excel(name = "平台-项目ID")
    private String projectId;

    /**
     * 用户姓名
     */
    @Excel(name = "用户姓名")
    private String trueName;

    /**
     * 用户手机号
     */
    @Excel(name = "用户手机号")
    private String phone;

    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remarks;

    /**
     * 审批进度0 未审批1 待发货2 已发货3 已拒绝
     */
    @Excel(name = "审批进度0 未审批1 待发货2 已发货3 已拒绝")
    private Long status;

    /**
     * 审批通过时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审批通过时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approvalTime;

    /**
     * 发货时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deliveryTime;


    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;


    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    private String voucher;

    private List<DevApplyItems> Items;

    public List<DevApplyItems> getItems() {
        return Items;
    }

    public void setItems(List<DevApplyItems> items) {
        Items = items;
    }

    public String getVoucher() {
        return voucher;
    }

    public void setVoucher(String voucher) {
        this.voucher = voucher;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setPartnerId(String partnerId) {
        this.partnerId = partnerId;
    }

    public String getPartnerId() {
        return partnerId;
    }

    public void setAddressId(String addressId) {
        this.addressId = addressId;
    }

    public String getAddressId() {
        return addressId;
    }

    public void setSuperiorId(String superiorId) {
        this.superiorId = superiorId;
    }

    public String getSuperiorId() {
        return superiorId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public String getProjectId() {
        return projectId;
    }

    public void setTrueName(String trueName) {
        this.trueName = trueName;
    }

    public String getTrueName() {
        return trueName;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPhone() {
        return phone;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setStatus(Long status) {
        this.status = status;
    }

    public Long getStatus() {
        return status;
    }

    public void setApprovalTime(Date approvalTime) {
        this.approvalTime = approvalTime;
    }

    public Date getApprovalTime() {
        return approvalTime;
    }

    public void setDeliveryTime(Date deliveryTime) {
        this.deliveryTime = deliveryTime;
    }

    public Date getDeliveryTime() {
        return deliveryTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("partnerId", getPartnerId())
                .append("addressId", getAddressId())
                .append("superiorId", getSuperiorId())
                .append("projectId", getProjectId())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("trueName", getTrueName())
                .append("phone", getPhone())
                .append("remarks", getRemarks())
                .append("status", getStatus())
                .append("approvalTime", getApprovalTime())
                .append("deliveryTime", getDeliveryTime())
                .toString();
    }
}
